wayland/popup: Emit un-withdrawn event earlier
authorJonas Ådahl <jadahl@gmail.com>
Sat, 22 Feb 2020 19:09:38 +0000 (20:09 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Sat, 22 Feb 2020 19:09:38 +0000 (20:09 +0100)
Otherwise grabbing the seat will appear to have failed.

gdk/wayland/gdksurface-wayland.c

index e4fdae31225cebfb5a0a82563ec489e70952141b..d0fb6d8420e62adfb9a328846e6d51088f186b94 100644 (file)
@@ -2719,6 +2719,8 @@ gdk_wayland_surface_map_popup (GdkSurface     *surface,
   impl->popup.unconstrained_width = width;
   impl->popup.unconstrained_height = height;
   impl->mapped = TRUE;
+
+  gdk_synthesize_surface_state (surface, GDK_SURFACE_STATE_WITHDRAWN, 0);
 }
 
 static void
@@ -2826,7 +2828,6 @@ gdk_wayland_surface_present_popup (GdkSurface     *surface,
 
   if (impl->display_server.xdg_popup)
     {
-      gdk_synthesize_surface_state (surface, GDK_SURFACE_STATE_WITHDRAWN, 0);
       gdk_surface_invalidate_rect (surface, NULL);
       return TRUE;
     }